package com.woniuxy02;

public class Test08 {

    public static void main(String[] args) {
       try{
           login("a","xaaa");
           System.out.println("进入系统");
       }catch (Exception e){
           System.out.println(e.getMessage());
       }
    }

    public static void  login(String uname,String pwd){
       if(!"a".equals(uname)){
           throw new UserNameNotExistsException("用户名不存在");
       }else if(!"aaa".equals(pwd)){
           throw new PasswordIncrroectException("密码错误");
       }
    }

}
